<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        {{msg}}
        <div>{{scoreman}}</div>
        <div v-html="aa"></div>
        <div v-if="sex=='男'">当前是男性，男性的及格分是：{{scoreman}}</div>
        <div v-else >当前是女性</div>
        <button @click="fn">点击打印日志</button>
        <button @click="buy(5)">点击加钱</button>
        <div>
            <img v-bind:src="images" alt="" width="20px" height="20px">
        </div>
    </div>
    
</body>
<script src="./js/vue2.7.js"></script>
<script>
    const app = new Vue({
        el: '#app',
        data: {
            msg: "xxxworld",
            aa: "<a href=''>study day day</a>",
            scoreman: 78,
            scorewomenman: 75,

            sex: '男',
            images:'./img/image.png'
        },
        methods:{
            // 提供处理函数
            fn(){
                console.log("hahahaha---");
                // vue中methods的所有函数，this都指向当前实例
                console.log(this === app);

            },
            buy(aa){
                this.scoreman+=aa;
            }
        }

    });

</script>

</html>